package com.xinhe.web.controller;

import com.xinhe.web.entity.AdapayBusinessCategory;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

@RestController
@RequestMapping(value = "/adapayBusinessCategory")
@Api(value = "adapay经营类目", tags = "adapay经营类目")
public class AdapayBusinessCategoryController {
   /* @Autowired
    private IAdapayBusinessCategoryService adapayBusinessCategoryService;

    @ApiOperation(httpMethod = "GET", value = "分页查询adapay经营类目")
    @RequestMapping({"/pageAdapayBusinessCategory"})
    public PageResult<AdapayBusinessCategoryView> pageAdapayBusinessCategory(AdapayBusinessCategoryQuery query) {
        return this.adapayBusinessCategoryService.pageAdapayBusinessCategory(query);
    }
    @ApiOperation(httpMethod = "POST", value = "保存adapay经营类目")
    @RequestMapping({"/saveAdapayBusinessCategory"})
    public BaseResult saveAdapayBusinessCategory(@Valid AdapayBusinessCategoryModel model, BindingResult bind) {
        if (bind.hasErrors()) {
            BaseResult result = new BaseResult();
            result.setBindingResult(bind);
            return result;
        }
        return (BaseResult)this.adapayBusinessCategoryService.saveModel((IdModel)model);
    }
    @ApiOperation(httpMethod = "GET", value = "删除adapay经营类目")
    @ApiImplicitParam(name = "adapayBusinessCategoryId", value = "标识", dataTypeClass = Long.class, required = true)
    @RequestMapping({"/deleteAdapayBusinessCategory"})
    public BaseResult deleteAdapayBusinessCategory(Long adapayBusinessCategoryId) {
        return this.adapayBusinessCategoryService.delete(adapayBusinessCategoryId);
    }
    @ApiOperation(httpMethod = "GET", value = "adapay经营类目详情")
    @ApiImplicitParam(name = "adapayBusinessCategoryId", value = "标识", dataTypeClass = Long.class, required = true)
    @RequestMapping({"/detailAdapayBusinessCategory"})
    public BeanResult<AdapayBusinessCategory> detailAdapayBusinessCategory(Long adapayBusinessCategoryId) {
        return this.adapayBusinessCategoryService.findById(adapayBusinessCategoryId);
    }*/

}